package com.microframework.config;

import java.util.HashMap;
import java.util.Map;

import org.springframework.http.HttpMethod;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class HttpConnectionConfig {
    private String url;
    private HttpMethod method = HttpMethod.GET;
    private Map<String, String> headers = new HashMap<>();
    private Map<String, String> queryParams = new HashMap<>();
    private String body;
    private int connectTimeout = 5000;
    private int readTimeout = 10000;
    private int maxRetries = 3;
    private long retryInterval = 1000;
    private AuthConfig authConfig;
    
    @Data
    public static class AuthConfig {
        private AuthType type;
        private String token;
        private String username;
        private String password;
        private String tokenUrl;
        private String clientId;
        private String clientSecret;
    }
    
    public enum AuthType {
        NONE, BASIC, BEARER_TOKEN, OAUTH2
    }
}